<?php


require 'database.php';

$copyorder=file_get_contents("copyorder.json");
$copyorder=json_decode($copyorder,1);


$issue=file_get_contents("issue.json");
$issue=json_decode($issue,1);
$issue=$issue[count($issue)-1]["issue"];

$data=[];
for ($i = 0; $i < count($copyorder); $i++) {
    if($copyorder[$i]["issue"]==$issue){
        $data[]=$copyorder[$i];
        // array_push($data,$copyorder[$i]);
       
    }
}


return json($data);


